import httpInstance from "@/utils/http.js";

export const getCategoryAPI = (id)=> {
    return httpInstance({
        url: '/category',
        params: {
            id
        }
    })
}

/**
 * @description: 二级分类列表数据
 * @param(*) id 分类id
 */
export const getCategoryFilterAPI = (id)=>{
    return httpInstance({
        url: '/category/sub/filter',
        params: {
            id
        }
    })
}

/**
 * @description: 获取导航数据
 * @param data
 * @returns {*}
 */
export const getSubCategoryAPI = (data)=>{
    return httpInstance({
        url: '/category/goods/temporary',
        method: 'POST',
        data
    })
}